﻿namespace CodeGenerator.CSharp
{       
    /// <summary>
    /// Defines a code unit for a region.
    /// </summary>
    public class Region : CodeUnit
    {
        public Region(string name) : base(name) { } 

        public override string ToString()
        {
            CodeBuilder Code = new CodeBuilder();
            Code.Add(base.Padding + "#region " + this.Name);
            Code.Add(this.CodeUnits.ToString());
            Code.Add(base.Padding + "#endregion");          
            return Code.ToString();
        }

    }
}
